package com.ayh.campusfun.service.impl;

import com.ayh.campusfun.common.service.impl.BaseServiceImpl;
import com.ayh.campusfun.dao.GoodFriendDao;
import com.ayh.campusfun.entity.GoodFriend;
import com.ayh.campusfun.service.GoodFriendService;
import com.ayh.campusfun.vo.FriendVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 好友表(GoodFriend)表服务实现类
 *
 * @author ayh
 * @since 2021-03-20 20:42:02
 */
@Service
public class GoodFriendServiceImpl extends BaseServiceImpl<GoodFriend> implements GoodFriendService {
    @Resource
    private GoodFriendDao goodFriendDao;

    @Override
    public List<FriendVO> findFriendList(Map<String, Object> map) {
        return goodFriendDao.findFriendList(map);
    }

    @Override
    public List<FriendVO> searchFriendList(Map<String, Object> map) {
        return goodFriendDao.searchFriendList(map);
    }

    @Override
    public FriendVO findFriendByUid(String uid, String friendId) {
        return goodFriendDao.findFriendByUid(uid,friendId);
    }

    @Override
    public Long findFriendByUidAndFriendId(String uid, String friendId) {
        return goodFriendDao.findFriendByUidAndFriendId(uid, friendId);
    }

    @Override
    public List<GoodFriend> findGoodFriendAuthMsgList(Map<String, Object> map) {
        return goodFriendDao.findGoodFriendAuthMsgList(map);
    }

    @Override
    public void updateByUidAndFriendId(String uid, String friendUid) {
        goodFriendDao.updateByUidAndFriendId(uid, friendUid);
    }

    @Override
    public void updateMsgStatusByUid(String uid) {
        goodFriendDao.updateMsgStatusByUid(uid);
    }
}
